<template>
	<view class="">
		<!-- 9.30 可移动 10.15 将可移动区域排除 iphone其他型号 11.10 判断是否显示可移动区域 -->
		<!-- <movable-area class="movable" :style="{height: autos ? 'calc(100% - ' + BotHeight + 'rpx)' : '100%'}"
			v-if="movepop">
			<movable-view @click="showMo" class="movable-item" direction="all" x="0" y="320" :inertia="true">
				<image :lazy-load="true" class="quick-btn"
					:src="imgprefix + '/web/uploads/tasklist/float.png?timeout=' + timeout"></image>
			</movable-view>
		</movable-area> -->
		<movable-area class="movable" :style="{height: autos ? 'calc(100% - ' + BotHeight + 'rpx)' : '100%'}"
			v-if="movepop || ispopop">
			<!-- v-if="ispopop" y=850 -->
			<movable-view @click="showMo" class="movable-item1" direction="all" x="750rpx" :y="movey" :inertia="true">
				<image :lazy-load="true" class="quick-btn1"
					:src="imgprefix + '/web/uploads/tasklist/float.png?timeout=' + timeout"></image>
			</movable-view>
		</movable-area>

		<movable-area class="movable" :style="{height: `calc(100% - ${BotHeight}rpx)`}">
			<movable-view @click="jump('/pages/store/transfer/transfer')" class="movable-item2" direction="all" x="750"
				y="962rpx" :inertia="true" v-if="isnavstore">
				<image :lazy-load="true" class="quick" mode="widthFix"
					:src="imgprefix + '/web/uploads/tasklist/valueflo.jpg?time=' + timeout"></image>
			</movable-view>
		</movable-area>
		<!-- <view class="nomove" @click="showMo" v-if="ispopop">
			<image :lazy-load="true" class="quick-btn1"
				:src="imgprefix + '/web/uploads/tasklist/float.png?timeout=' + timeout"></image>
		</view> -->
		<!-- 深蓝框 -->
		<u-popup :customStyle="cusatyle" :maskCloseAble="false" v-model="show" mode="center" border-radius="14"
			@close="show = false" v-if="show">
			<view class="pomodel" @touchmove.stop.prevent>
				<view class="clde" @click="show = false">
					<view class="integral">
						<!-- 总积分 -->
						<view class="">
							目前有
						</view>
						<view class="">
							<text style="font-size: 36rpx;">{{integral}}</text>金币
						</view>
					</view>
					<image class="image" src="../../static/image/icon/xb.png" mode=""></image>
				</view>
				<view class="other">
					<view class="viewtask">
						<image class="img" src="../../static/image/viewtask.png" mode=""></image>
					</view>

					<scroll-view scroll-y class="fp-scroll">
						<view class="f-item" v-for="(item,index) in qthemet" :key="index" v-if="whegroup">
							<view class="fun-item">
								<view class="ft-title">
									<view>{{index+1}}.{{item.name}}</view>
									<view class="leter">
										{{item.cattitle ? item.cattitle : ''}}
									</view>
								</view>
							</view>
						</view>
						<view class="f-item" v-for="(item,index) in themet" :key="index"
							v-if="(index == 4 && item.unstore) || index != 4">
							<view class="fun-item" v-if="item.stext.length > 4">
								<view class="ft-title">
									<view>{{whegroup ? index+3 : index+1}}.{{item.name}}</view>
									<view class="leter">
										{{item.cattitle ? item.cattitle : ''}}
									</view>
								</view>
								<view class="seioun" :decode="true" @click="techange(item)">
									{{item.stext}}
								</view>
							</view>
							<view class="ft-item" v-else>
								<view class="ft-title">{{whegroup ? index+3 : index+1}}.{{item.name}}
									<text v-if="item.goldsnum">得{{item.goldsnum}}金币</text>
								</view>
								<view class="fc-item">
									<view class="leter">
										{{item.cattitle ? item.cattitle : ''}}
										<!-- 9.30 取消箭头 -->
										<!-- <view class="arrow" v-if="item.picurl">
											<image :src="item.picurl" mode=""></image>
										</view> -->
									</view>
									<!-- 9.24 修改 -->
									<!-- <view class="seio" @click="techange(item)" :style="item.color">
										{{item.stext}}
									</view> -->
									<button class="seio" v-if="item.navigate == 'share'" open-type="share"
										:style="item.color">
										<!-- {{item.receive ? item.satext : item.stext}} -->
										<!-- 9.30 -->
										{{item.stext}}
									</button>
									<view class="seio" v-else @click="techange(item)" :style="item.color">
										<!-- {{item.receive ? item.satext : item.stext}} -->
										<!-- 9.30 -->
										{{item.stext}}
									</view>
								</view>
							</view>
						</view>
					</scroll-view>
					<!-- 9.23 修改样式 9.30 修改 跳转连接 -->
					<view class="more" @click="jump('/pages/goods/regoodslist?available=false')">
						<view class="more-gold">
							<view class="">
								得更多金币
							</view>
							<view class="more-sti">
								今日上新800多种珠宝
							</view>
							<view class="more-cli">
								点击进入
							</view>
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 浅蓝框 在金币商品详情页显示 -->
		<u-popup :customStyle="custyle" :maskCloseAble="false" v-model="isshow" mode="center" border-radius="14"
			@close="isshow = false" v-if="isshow">
			<view class="model" @touchmove.stop.prevent>
				<view class="bgp">
					<image class="f-bg" mode="widthFix" :src="imgprefix + '/web/uploads/taskpopup/bg.png'"></image>
				</view>
				<view class="clde" @click="isshow = false">
					<image class="image" src="../../static/image/icon/xb.png" v-if="unstore" mode=""></image>
					<image class="image" src="../../static/image/icon/xr.png" v-else mode=""></image>
				</view>
				<scroll-view scroll-y class="fp-scroll">
					<view class="f-item" v-for="(item,index) in themet" :key="index" v-if="item.id">
						<view class="ft-item" v-if="item.unified">
							<view>{{item.id}}.{{item.name}}<text v-if="item.goldsnum">得{{item.goldsnum}}金币</text>
							</view>
							<view class="fc-item">
								<view class="leter">{{item.cattitle}}</view>
								<!-- 9.24 修改 -->
								<!-- <view class="seio" @click="techange(item)">点击进入</view> -->
								<button class="seio" v-if="item.navigate == 'share'" open-type="share">
									<!-- {{item.receive ? '已完成' : '点击进入'}} -->
									<!-- 9.30 -->
									点击进入
								</button>
								<view class="seio" v-else @click="techange(item)">
									<!-- {{item.receive ? '已完成' : '点击进入'}} -->
									<!-- 9.30 -->
									点击进入
								</view>
							</view>
						</view>
						<view class="fun-item" v-else>
							<view class="">
								<view>{{item.id}}.{{item.name}}</view>
								<view class="leter">{{item.cattitle}}</view>
							</view>
							<view class="seioun" :decode="true" @click="techange(item)">
								查看免费珠宝 &nbsp; 点击进入
							</view>
						</view>
					</view>
				</scroll-view>
				<view class="spec">
					<view class="">
						<view class="">
							特别说明：
						</view>
						<view class="spex">
							<view class="">
								<!-- 成为珠宝店店主得金币是非珠宝店 10.19 -->
								珠宝店店主获得金币等于普通会员的
								<!-- 1.5倍 --><text class="spexa">1.5倍</text>
							</view>
							<!-- <view class="">
								店主的<text class="spexa">1.5倍</text>
							</view> -->
						</view>
					</view>
					<view class="" v-if="unstore">
						<view class="aply">
							免费申请
						</view>
						<view class="aplyb" :decode="true" @click="jump('/pages/bepartner/apply/apply')">
							免费成为珠宝店店主 &nbsp; <text class="spex">点击进入</text>
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 11.10 黄金，免费珠宝框 11.12 跳转黄金商品列表加黄金判断 -->
		<u-popup :customStyle="cusatyle" :maskCloseAble="false" v-model="hzshow" mode="center" border-radius="14"
			@close="closehz" v-if="hzshow && autos" :mask="false">
			<view class="pomodel" @touchmove.stop.prevent>
				<view class="clde" @click="closehz">
					<view></view>
					<!-- <image class="image" src="../../static/image/icon/xb.png" mode=""></image> -->
					<icon type="cancel" size="30" color="#9a5e3b"></icon>
				</view>

				<scroll-view scroll-y class="other-scroll">
					<view class="list-one list-one2" v-if="list.length > 0">
						<view class="list-one-item" v-for="(item,index) in list" :key="index" @click="routeGo(item)">
							<image class="image" :src="item.malloption.option1.cateinfo[0].icon_url" mode="">
							</image>
							<view class="u-line-1">{{item.mall.name}}</view>
							<view class="u-line-1">{{item.mall.catname}}</view>
							<view class="cliget">点击进入>>></view>
							<text class="living">正在直播</text>
						</view>
					</view>
					<view class="list-one" v-else>
						<view class="list-one-item" v-for="(item,index) in sprframe" :key="index"
							@click="jump(item.url)">
							<image class="image" :src="item.icon_url" mode=""></image>
							<view class="u-line-1">{{item.name}}</view>
						</view>
					</view>
					<!-- <view class="" v-for="(item,index) in sprframe" :key="index">
						<view class="more" @click="jump(item.url)">
							<image class="more-img" :src="item.icon_url" mode="widthFix"></image>
							<view class="more-gold">
								<view class="" v-if="item.name">
									{{item.name}}
								</view>
								<view class="more-sti" v-if="item.params && item.params.describe">
									{{item.params.describe}}
								</view>
								<view class="more-cli" v-if="item.params && item.params.content">
									{{item.params.content}}
								</view>
							</view>
						</view>
					</view> -->
				</scroll-view>
				<!-- <view class="other">
					<view class="more" @click="jump('/plugins/oneyuan_mall/index/index')">
						<view class="more-gold">
							<view class="">
								一元买黄金
							</view>
							<view class="more-sti">
								今日上新800多种珠宝
							</view>
							<view class="more-cli">
								点击进入
							</view>
						</view>
					</view>
					<view class="more" @click="jump('/pages/goods/catslist?cat_id=691&title=黄金&godstype=huangjin')">
						<view class="more-gold">
							<view class="">
								黄金商品
							</view>
							<view class="more-sti">
								今日上新800多种珠宝
							</view>
							<view class="more-cli">
								点击进入
							</view>
						</view>
					</view>
					<view class="more" @click="jump('/plugins/jinbi_mall/index/index')">
						<view class="more-gold">
							<view class="">
								免费获得珠宝
							</view>
							<view class="more-sti">
								今日上新800多种珠宝
							</view>
							<view class="more-cli">
								点击进入
							</view>
						</view>
					</view>
				</view> -->
			</view>
		</u-popup>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapState
	}
	from 'vuex'
	import uPopup from '../../components/basic-component/u-popup/u-popup.vue';
	let resuc = false
	export default {
		components: {
			uPopup
		},
		// 10.15
		computed: {
			...mapGetters('iPhoneX', {
				BotHeight: 'getBotHeight',
			}),
			...mapState({
				userInfo: state => state.user.info
			}),
		},
		data() {
			return {
				show: false,
				isshow: false,
				hzshow: false,
				unstore: true,
				custyle: {
					'background-color': 'rgba(255, 255, 255, 0.4)',
					'backdrop-filter': 'blur(10rpx)'
				},
				cusatyle: {
					'background-color': 'rgba(255, 255, 255, 0.4)',
					// 'backdrop-filter': 'blur(6rpx)'
				},
				qthemet: [ //
					{
						id: 1,
						url: '/plugins/jinbi_mall/index/index',
						name: '邀请新人进群获得100金币(群主发放)',
						// cattitle: '请在邀请后联系群管理以获得金币',
						unified: true,
						stext: '去完成',
						satext: '已完成',
						color: 'color:#FFFFFF;border-radius: 16rpx;padding: 0 24rpx;',
						picurl: '/static/image/arrowb.png',
						navigate: 'navigation'
					},
					{
						id: 2,
						url: '/pages/goods/list?available=true',
						name: '扫码进群获得50金币(群主发放)',
						// cattitle: '请在邀请后联系群管理以获得金币',
						unified: true,
						stext: '去完成',
						satext: '已完成',
						color: 'color:#FFFFFF;border-radius: 60rpx;',
						navigate: 'navigation',
						type: 1,
						receive: false
					}
				],
				themet: [ //
					{
						id: 1,
						// url: '/plugins/integral_mall/index/index',
						url: '/plugins/jinbi_mall/index/index',
						name: '免费得珠宝',
						cattitle: '共有2860款珠宝',
						unified: false,
						stext: '查看免费珠宝  点击进入',
						color: 'color:#FFFFFF;border-radius: 16rpx;padding: 0 24rpx;',
						picurl: '/static/image/arrowb.png',
						navigate: 'navigation'
					},
					{
						id: 2,
						url: '/pages/goods/list?available=true',
						name: '浏览精选珠宝',
						cattitle: '浏览60秒得金币,首次有效',
						unified: true,
						stext: '去完成',
						satext: '已完成',
						color: 'color:#FFFFFF;border-radius: 60rpx;',
						navigate: 'navigation',
						type: 1,
						receive: false,
						goldsnum: 2
					},
					{
						id: 3,
						url: '/pages/gospeed/index?available=true&zhilve=3',
						name: '浏览好货快快抢',
						cattitle: '浏览60秒得金币,首次有效',
						unified: true,
						stext: '去完成',
						satext: '已完成',
						color: 'color:#FFFFFF;border-radius: 60rpx;',
						navigate: 'redirect',
						type: 2,
						receive: false,
						goldsnum: 2
					},
					// {
					// 	id: 4,
					// 	url: '/pages/sixty/release/release?available=true',
					// 	name: '在嗨我来了发布视频',
					// 	cattitle: '要成功发布,首次有效',
					// 	unified: true,
					// 	stext: '去完成',
					// 	satext: '已完成',
					// 	color: 'color:#FFFFFF;border-radius: 60rpx;',
					// 	navigate: 'navigation',
					// 	type: 0,
					// 	receive: false,
					// 	goldsnum: 2
					// },
					{
						id: 4,
						url: '/pages/store/reward/reward?available=true',
						name: '转发新用户',
						cattitle: '要新用户登录',
						unified: true,
						stext: '去完成',
						color: 'color:#FFFFFF;border-radius: 60rpx;',
						navigate: 'share', // 9.24
						goldsnum: 10
					},
					{
						// id: 5,
						url: '/pages/bepartner/apply/apply?available=true',
						name: '免费成为珠宝店店主',
						stext: '去完成',
						color: 'color:#FFFFFF;border-radius: 60rpx;',
						navigate: 'navigation',
						unstore: true,
						unified: true
					}
				],
				// 任务弹框首次进入小程序
				sprframe: [],
				imgprefix: this.$siteInfo.imgroot,
				timeout: new Date().getTime(),
				// 9.30 总积分
				integral: 0,
				// 11.02 假拼团（赠金币活动）
				isGuest: false,

				list: []
			}
		},
		props: {
			// 是否从群链接打开
			whegroup: {
				type: Boolean,
				default: false
			},
			flobottom: {
				type: String,
				default: null
			},
			flotop: {
				type: String,
				default: null
			},
			floright: {
				type: String,
				default: null
			},
			floleft: {
				type: String,
				default: null
			},
			// 假拼团 11.01
			useridshgold: {
				type: Number,
				default: 0
			},
			// 11.10 是否显示可移动模块
			movepop: {
				type: Boolean,
				default: true
			},
			// 免费还珠宝距离上部高度
			movey: {
				type: String,
				default: '820rpx'
			},
			// 显示在右下角
			ispopop: {
				type: Boolean,
				default: false
			},
			// 网上珠宝店价格
			isnavstore: {
				type: Boolean,
				default: false
			},
			// 是否展示自动弹窗
			autos: {
				type: Boolean,
				default: true
			},
			// 商品真分享
			useridres: {
				type: Number,
				default: 0
			},
			targoodsid: {
				type: Number,
				default: 0
			},
			mallid: {
				type: Number,
				default: 0
			},
		},
		// 只要切换页面就会触发
		mounted() {
			// 每天首次登录 9.29取消
			/* let settime = this.$utils.datetime('Ymd')
			let setfirt = this.$storage.getStorageSync('setfirstlogintime')
			if (setfirt) {
				if (settime > setfirt) {
					this.isshow = true
					this.$storage.setStorageSync('setfirstlogintime', settime)
				} else {
					this.isshow = false
				}
			} else {
				this.isshow = true
				this.$storage.setStorageSync('setfirstlogintime', settime)
			} */
			// 9.29 每次进入小程序
			// 判断是否直接弹框显示移动框，在存在移动框时直接弹出
			if (this.movepop) {
				if (getApp().globalData.firstapplet) {
					// 11.10 每次进入弹出黄金珠宝框
					// this.isshow = true
					this.hzshow = true
				}
			}

			// 9.26 判断是否有店
			this.isstore = false
			this.unstore = true
			if (this.hzshow == true) {
				// this.allReq(14)
				this.loadList()
			}
			// 11.02 注释
			// this.getInfo()
			// 11.10 注释
			// // 9.27 获取金币数量
			// if (this.isshow) {
			// 	// 9.26 判断任务完成
			// 	this.themet.forEach((item) => {
			// 		if (item.type || item.type == 0) {
			// 			this.tasksu(item)
			// 		}
			// 	})
			// }
			// 9.30 获取总积分
			this.goldnum()
		},
		// 11.02 假拼团（赠金币活动）
		watch: {
			isGuest: {
				handler: function() {
					let actoken = uni.getStorageSync('_USER_ACCESS_TOKEN')
					if (actoken === '' || actoken === null) {
						uni.login({
							success: (loginRes) => {
								this.alogin(loginRes)
							}
						})
					} else {
						this.getInfo()
					}
				},
				immediate: true,
			}
		},
		methods: {
			closehz() {
				this.hzshow = false
				// #ifdef MP-WEIXIN
				// 第一次点击关闭弹窗显示订阅提示
				let settime = this.$utils.datetime('Ymd')
				let setfirt = this.$storage.getStorageSync('setfirstlogintime')
				if (setfirt) {
					if (settime > setfirt) {
						// _VmgAobYzU259yHHMatU5cCm4UP9dF808LHmX5aok4E
						this.$subscribe(['Rk_zaoCmy4SYCqGhzw8cnYcBSWvCBWVdx5v-uWCk4gw','JG9Rvu4oPbMNCeKoGthclrZjw4rNFuNa8gtlKF32DaU']).then(res => {
							// console.log(res, 'siccc');
						}).catch(e => {
							// console.log(e, 'eee');
						})
						this.$storage.setStorageSync('setfirstlogintime', settime)
					}
				} else {
					// _VmgAobYzU259yHHMatU5cCm4UP9dF808LHmX5aok4E
					// Rk_zaoCmy4SYCqGhzw8cnYcBSWvCBWVdx5v-uWCk4gw
					this.$subscribe(['Rk_zaoCmy4SYCqGhzw8cnYcBSWvCBWVdx5v-uWCk4gw','JG9Rvu4oPbMNCeKoGthclrZjw4rNFuNa8gtlKF32DaU']).then(res => {
						// console.log(res, 'siccc');
					}).catch(e => {
						// console.log(e, 'eee');
					})
					this.$storage.setStorageSync('setfirstlogintime', settime)
				}

				// this.$subscribe(['_VmgAobYzU259yHHMatU5cCm4UP9dF808LHmX5aok4E']).then(res => {
				// 	// console.log(res, 'siccc');
				// }).catch(e => {
				// 	// console.log(e, 'eee');
				// })
				// #endif
			},
			loadList() {
				this.$request({
					url: this.$api.entity.subsclist,
				}).then(res => {
					if (res.data.list.length > 0) {
						this.list = res.data.list
						this.list.forEach(item => {
							if (item.mall.catid == 0) {
								item.mall.catname = '平台店'
							} else if (item.mall.catid == 1) {
								item.mall.catname = '实体店'
							} else if (item.mall.catid == 2) {
								item.mall.catname = '主播'
							} else if (item.mall.catid == 3) {
								item.mall.catname = '子品牌店'
							} else if (item.mall.catid == 4) {
								item.mall.catname = '平台子店'
							} else if (item.mall.catid == 5) {
								item.mall.catname = '其他'
							}
						})
					} else {
						this.allReq(14)
					}
				})
			},
			routeGo(item) {
				uni.navigateTo({
					url: '/pages/entity/index?mall_id=' + item.mall_id
				})
			},
			// 获取首页弹框三大块数据
			allReq(pid) {
				this.$request({
					url: this.$api.navs.list,
					data: {
						pid: pid,
						status: 1,
						limit: 200
					}
				}).then((res) => {
					if (res.code == 0) {
						if (pid == 13) { // 金币任务列表
							// this.themet = res.data.list
						} else if (pid == 14) { // 弹框任务列表
							this.sprframe = res.data.list
						}
					}
				}).catch(() => {

				})
			},
			showMo() {
				this.show = true
				// 9.26 判断任务完成
				// this.themet.forEach((item) => {
				// 	if (item.type || item.type == 0) {
				// 		this.tasksu(item)
				// 	}
				// })
				this.allReq(13)
				// 9.30 获取总积分
				this.allgold()
			},
			// 9.29 请求任务是否完成
			judgetask() {
				// this.themet.forEach((item) => {
				// 	if (item.type || item.type == 0) {
				// 		this.tasksu(item)
				// 	}
				// })
				this.allReq(13)
				this.allgold()
			},
			//  9.26判断任务是否完成
			tasksu(item) {
				this.$request({
					url: this.$api.gold.index,
					data: {
						type: item.type,
						querystate: 1
					}
				}).then((res) => {
					if (res.code === 0) {
						resuc = true
						if (res.data.isdone == 0) {
							item.receive = false
						} else {
							item.receive = true
						}
					}
				}).catch(() => {

				})
			},
			// 9.27 加载金币数量
			goldnum() {
				this.$request({
					url: this.$api.integral_mall.setting + '&type=["integral_ratio"]'
				}).then((res) => {
					this.themet.forEach((item, index) => {
						// 与后台 integral_ratio.goldpurenum 对应
						// if (item.goldsnum) {
						item.goldsnum = res.data.integral_ratio.goldpurenum[index]
						if (this.isstore) {
							item.goldsnum = res.data.integral_ratio.goldpurenum[index] * res.data
								.integral_ratio.times
						}
						// }
					})
				}).catch(() => {

				})
			},
			// 9.30 查看总金币数量
			allgold() {
				let that = this
				that.$request({
					url: that.$api.integral_mall.index,
				}).then(response => {
					if (response.code === 0) {
						that.integral = response.data.userInfo.integral;
					} else {
						if (response.msg) {
							uni.showToast({
								title: response.msg,
								icon: 'none',
								duration: 1000
							});
						}
					}
				})
			},
			// 11.01 登录，获取token
			async alogin(loginRes) {
				let self = this
				const response = await self.$request({
					url: this.$api.passport.login,
					method: 'post',
					data: {
						code: loginRes.code
					},
				})
				if (response.code == 0) {
					uni.setStorageSync('_USER_ACCESS_TOKEN', response.data
						.access_token)
					this.getInfo()
					if (this.useridres && this.useridres != 0 && this.targoodsid && this.targoodsid != 0) {
						// this.assist()
					}
				}
			},
			// 9.26 判断是否有店
			async getInfo() {
				let self = this
				const res = await self.$request({
					url: self.$api.user.user_info,
					method: 'get',
				})
				if (res.code == 0) {
					// self.$store.dispatch('user/info', res.data);
					// 11.01 假拼团
					// if (self.useridshgold != 0) {
					// 	this.tasksuf()
					// }
					// console.log(this.useridres);
					if (this.useridres && this.useridres != 0 && this.targoodsid && this.targoodsid != 0) {
						// this.assist()
					}
					// 申请后有user vid的直接进入这一步
					if (res.data.vdian_id != null) {
						self.appStatus(res.data.vdian_id)
					}
				}
			},
			assist() {
				// console.log(666);
				let data = {
					type: 5,
					targetid: this.targoodsid,
					userid: this.useridres,
					userid: this.userInfo.options.user_id
				}
				let mallurl = this.$siteInfo.apiroot + '?_mall_id=' + this.mallid + '&r='
				let url = this.$api.gold.index
				if (this.mallid > 1) {
					// url = this.storemall.gold.index
					url = mallurl + this.$apiUrl.gold.index
				}
				this.$request({
					url: url,
					data: data
				}).then((res) => {
					if (res.data.isdone) {
						// console.log('已助力')
					}
				}).catch(() => {

				})
			},
			// 假拼团 11.01
			tasksuf() {
				let self = this
				self.$request({
					url: self.$api.gold.index,
					data: {
						type: 4,
						targetid: 1,
						userid: self.useridshgold
					}
				}).then((res) => {
					// console.log(res);
					if (res.code == 0) {}
				}).catch(() => {

				})
			},
			// 判断是否有店
			async appStatus(id = 0) {
				let self = this
				const res = await self.$request({
					url: self.$api.apply.store,
					data: {
						id: id
					},
					method: 'get',
				})
				if (res.code == 0) {
					// 申请后有user vid的直接进入这一步
					if (res.data.is_delete == 0) {
						if (res.data.review_status == 1) {
							self.unstore = false
							self.isstore = true
							self.themet[4].unstore = self.unstore
							// 后加
							self.goldnum()
						} else {
							self.unstore = true
							self.isstore = false
							self.themet[4].unstore = self.unstore
						}
					} else {
						self.unstore = true
						self.isstore = false
						self.themet[4].unstore = self.unstore
					}
				}
			},
			techange(item) {
				// 9.30 取消完成任务就不可点状态
				// if (item.receive) {
				// 	return
				// }
				// 9.30 任务一：点击顺序取商品列表
				if (item.id == 2) {
					this.$request({
						url: this.$api.gold.goodslist,
						data: {
							pid: 2,
							status: 1
						}
					}).then(res => {
						// 11.10 修改跳转链接
						let durl = '/pages/goods/catslist'
						let uelr = res.data.url
						if (item.goldsnum) {
							// 10.8
							if (uelr.indexOf('?') == -1) {
								durl = durl + '?goldsnum=' + item.goldsnum + '&available=true&title=' + res.data
									.name
							} else {
								durl = durl + uelr.substring(uelr.lastIndexOf('?')) + '&goldsnum=' +
									item.goldsnum + '&available=true'
							}
						}

						uni.navigateTo({
							url: durl
						})
					})
				} else {
					if (item.goldsnum) {
						item.url = item.url + '&goldsnum=' + item.goldsnum
					}
					if (item.navigate == 'navigation') {
						uni.navigateTo({
							url: item.url
						})
					} else if (item.navigate == 'redirect') {
						uni.redirectTo({
							url: item.url
						})
					}
				}
			},
			jump(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	// 9.30 可移动
	.movable {
		position: fixed;
		top: 0;
		left: 0;
		pointer-events: none;
		z-index: 1001;
		width: 750rpx;
		height: 100%;

		.movable-item {
			pointer-events: auto;
			width: 190rpx;
			height: 190rpx;
		}

		.movable-item1 {
			pointer-events: auto;
			width: 120rpx;
			height: 120rpx;
		}

		.movable-item2 {
			pointer-events: auto;
			width: 200rpx;
			height: 98rpx;
			// height: 200rpx;
		}

		.quick {
			width: 200rpx;
			// height: 200rpx;
			height: 98rpx;
		}
	}

	.pomodel {
		position: relative;
		width: 750rpx;
		// min-height: 620rpx;
		// min-height: 800rpx;

		.f-item {
			.ft-title {
				padding-left: 24rpx;
			}
		}

		.fun-item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
		}

		.leter {
			text-indent: 1em;
			font-size: 26rpx;
			font-weight: normal;
		}

		.seioun {
			color: #FFFFFF;
			background-color: #408dff;
			color: #FFFFFF;
			height: 72rpx;
			text-align: center;
			line-height: 72rpx;
			border-radius: 16rpx;
			padding: 0 48rpx;
			font-weight: bold;
			font-size: 34rpx;
		}

		.fc-item {
			display: flex;
			padding-left: 24rpx;
			justify-content: space-between;

			.arrow {
				width: 328rpx;
				height: 96rpx;

				image {
					width: 45rpx;
					height: 96rpx;
					// 9.23
					// margin: 0 auto;
					// display: block;
				}
			}

			.seio {
				background-color: #408dff;
				padding: 0 48rpx;
				font-weight: bold;
				height: 50rpx;
				line-height: 50rpx;
				// 9.24
				margin: 0;
				font-size: 32rpx;
			}
		}

		.fp-scroll {
			height: 600rpx;

			.ft-title {
				font-size: 42rpx;
				font-weight: bold;
			}

			.fc-item {
				font-size: 32rpx;
			}
		}

		// 10.8修改
		.clde {
			width: 100%;
			// text-align: right;
			// padding-right: 32rpx;
			padding: 10rpx 32rpx;
			// padding-right: 32rpx;
			display: flex;
			justify-content: space-between;
			line-height: 50rpx;

			.integral {
				background-color: #ff2200;
				color: #FFFFFF;
				font-size: 28rpx;
				font-weight: bold;
				border-radius: 4rpx;
				padding: 2rpx 6rpx;
			}

			.image {
				width: 51rpx;
				height: 51rpx;
			}
		}

		.more {
			display: flex;
			padding: 20rpx;
			align-items: center;
			justify-content: space-between;

			.more-img {
				width: 100%;
			}

			// 9.23 修改样式
			.more-gold {
				width: 100%;
				height: 238rpx;
				background: #FFFFFF;
				border-radius: 32rpx;
				font-size: 48rpx;
				font-weight: bold;
				padding: 24rpx 12rpx;
				line-height: 60rpx;
				text-align: center;
			}

			.more-item {
				width: 329rpx;
				height: 238rpx;
				background: #FFFFFF;
				border-radius: 32rpx;
				font-size: 48rpx;
				font-weight: bold;
				padding: 24rpx 12rpx;
				line-height: 60rpx;
			}

			.more-sti {
				font-size: 30rpx;
				font-weight: normal;
			}

			.more-cli {
				height: 52rpx;
				line-height: 52rpx;
				background-color: #408dff;
				color: #FFFFFF;
				padding: 0 10rpx;
				font-size: 34rpx;
				width: 200rpx;
				margin: 20rpx 0 0 0;
				border-radius: 60rpx;
				text-align: center;
				// 9.23
				// float: right;
				margin: 20rpx auto 0;
			}
		}

		.other {
			background: #4c9cff;
			border-radius: 36rpx;

			.viewtask {
				width: 100%;
				height: 128rpx;
				padding: 45rpx 60rpx;

				.img {
					width: 605rpx;
					height: 64rpx;
				}
			}
		}
	}

	.omodel {
		background: #9a5e3b;
		border-radius: 36rpx;

		.clde {
			width: 100%;
			padding: 10rpx 32rpx;
			display: flex;
			justify-content: space-between;

			.image {
				width: 51rpx;
				height: 51rpx;
			}
		}
	}

	.other-scroll {
		height: 834rpx;
		background: #9a5e3b;
		border-radius: 36rpx;
		padding: 24rpx 0;

		.list-one {
			width: 720rpx;
			margin: 0 auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex-wrap: wrap;
			color: #FFFFFF;

			.list-one-item {
				width: 360rpx;
				// height: 416rpx;
				// height: 690rpx;
				// height: 542rpx;
				height: 620rpx;
				font-size: 28rpx;

				.image {
					width: 360rpx;
					// height: 350rpx;
					// height: 624rpx;
					// height: 482rpx;
					height: 560rpx;
				}
			}
		}

		.list-one2 {
			width: 720rpx;

			.list-one-item {
				width: 360rpx;
				height: 446rpx;
				// height: 710rpx;
				font-size: 28rpx;
				position: relative;

				.living {
					position: absolute;
					top: 0;
					left: 0;
					font-size: 24rpx;
					padding: 0 12rpx;
					background: #9e3b2a;
					border-radius: 0 36rpx 36rpx 0;
					opacity: 0.7;
				}

				.cliget {
					position: absolute;
					bottom: 86rpx;
					right: 0;
					font-size: 24rpx;
					padding: 0 12rpx;
					background: #9e3b2a;
				}

				.image {
					width: 360rpx;
					height: 360rpx;
					// height: 624rpx;
				}

				view+view {
					font-size: 24rpx;
				}
			}
		}

		.viewtask {
			width: 100%;
			height: 128rpx;
			padding: 45rpx 60rpx;

			.img {
				width: 605rpx;
				height: 64rpx;
			}
		}
	}

	.model {
		position: relative;
		width: 616rpx;
		// min-height: 620rpx;
		min-height: 1190rpx;

		.bgp {
			width: 616rpx;

			.f-bg {
				width: 100%;
			}
		}

		.clde {
			position: absolute;
			top: 152rpx;
			right: 8rpx;
			width: 51rpx;
			height: 51rpx;

			.image {
				width: 100%;
				height: 100%;
			}
		}

		.spec {
			width: 518rpx;
			font-size: 30rpx;
			font-weight: 600;
			position: absolute;
			bottom: 88rpx;
			left: 48rpx;

			.spex {
				font-size: 26rpx;
				font-weight: normal;
			}

			.spexa {
				font-size: 32rpx;
				font-weight: 600;
			}

			.aply {
				font-size: 36rpx;
			}

			.aplyb {
				height: 50rpx;
				line-height: 50rpx;
				width: 464rpx;
				margin: 0 auto;
				border-radius: 60rpx;
				text-align: center;
				background: linear-gradient(93deg, #c3e4fb, #8bccf9);
				// box-shadow: 0 5rpx 16rpx #1a6294;
				box-shadow: 0 5rpx 16rpx rgba($color: #1a6294, $alpha: 0.6);
			}
		}

		.fp-scroll {
			position: absolute;
			top: 420rpx;
			left: 48rpx;
			height: 468rpx;
			width: 576rpx;
			// width: 532rpx;

			.f-item {
				font-size: 30rpx;
				font-weight: 600;
				margin-bottom: 10rpx;

				.ft-item {
					width: 532rpx;
				}

				.fun-item {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 550rpx;
				}

				.fc-item {
					display: flex;
					align-items: center;
					justify-content: space-between;
				}

				.leter {
					text-indent: 1em;
					font-size: 26rpx;
					font-weight: normal;
				}

				.seio {
					font-size: 26rpx;
					color: #FFFFFF;
					background-color: #68b8ed;
					width: 184rpx;
					height: 40rpx;
					text-align: center;
					line-height: 40rpx;
					border-radius: 60rpx;
					box-shadow: 0 1rpx 5rpx rgba($color: #0a4267, $alpha: 0.6);
					// box-shadow: #0a4267;
					// 9.24
					margin: 0;
				}

				.seioun {
					font-size: 30rpx;
					color: #FFFFFF;
					background-color: #68b8ed;
					color: #ff0000;
					width: 346rpx;
					height: 72rpx;
					text-align: center;
					line-height: 72rpx;
					border-radius: 16rpx;
					box-shadow: 0 1rpx 5rpx rgba($color: #0a4267, $alpha: 0.6);
				}
			}
		}
	}

	// 返回顶部
	.quick-box {
		position: fixed;
		z-index: 1001;
		transition: opacity 0.4s;
	}

	.quick-btn {
		width: #{190rpx};
		height: #{190rpx};
	}

	.nomove {
		position: fixed;
		top: 72vh;
		right: 0;
		z-index: 1001;
	}

	.quick-btn1 {
		width: #{120rpx};
		height: #{120rpx};
	}
</style>
